{{extend 'layout.html'}}
<script>
      $(function() {
          $("table#reviews").tablesorter({ sortList: [[1,0]] , 
              headers: {
                  0: { sorter: false }
              }
          });
          {{if messages.get('submitted_review',False):}}
              $("div#alert").addClass("alert-message success");
              $("div#alert").append("Review successfully submitted for approval!");
              $("div#alert").append("\<a class='close' href='#'\>x\<\/a\>");
              $("div#alert a.close").click(function() {
                  $(this).parent().hide();
              });
          {{pass}}
      });
  </script>
  <div class="row">
      <div class="span6">
          <div id="alert">
          </div>
      </div>
  </div>
<table id="reviews" class="bordered-table zebra-striped">
    <thead>
        <tr>
            {{headers = ["Artist", "Album","Genre","Date Added"]}} 
            {{for h in headers:}}
            <th class="header">{{=h}}</th>
            {{pass}}
            <th class="header">Actions</th>
        </tr>
    </thead>
    <tbody>
        {{for reviewEntity in reviews:}}
        <tr>
            <td>
                {{=reviewEntity.ArtistName}}
            </td>
            <td>
                {{=reviewEntity.AlbumName}}
            </td>
            <td>
                {{=reviewEntity.GenreDesc}}
            </td>
            <td>
                {{=reviewEntity.ReceiveDate}}
            </td>
            <td>
                <a class="small btn info"
                    href="/radio/reviews/submit/{{=reviewEntity.AlbumID}}">review</a> 
            </td>
        </tr>
       {{pass}}
    </tbody>
</table>
